1. Field of the Invention
The present invention relates to two-dimensional digital image processing, and more particularly, to a method of grouping pixels in a 2D digital image that assigns labels to regions of objects to differentiate between the objects separated in the input image and groups a region of an object having the same label into one group when pattern recognition and image process are performed on the 2D digital image.
2. Description of the Related Art
In general, in order to perform image processing, such as pattern recognition, of a two-dimensional (2D) image that consists of a plurality of pixels, labels are given to pixels representing a particular color or an object having a particular shape, and then a grouping process needs to be performed to combine pixels having the same label that form a region into one group.
Labeling or grouping schemes, which have been known in the related art, may include a labeling method that sequentially checks pixels adjacent to a target pixel until all pixels connected to the target pixel are labeled using a recursive call according to an 8-adjacent method. However, in this method, the recursive call is repeated until the labeling process is completed. Therefore, when an image increases in size or an object in the image is large, the processing rate may be decreased due to excessive recursive calls. Furthermore, a labeling process is performed after pixel information about one frame of the image is completely stored, which makes it difficult to realize real-time processing. An external memory is separately used to save the information on the one frame, which makes hardware implementation difficult.
Another labeling or grouping scheme, which has been known in the art, may include a labeling method that combines pixels having the same label into one group having the shape of a square, forming a window on the basis of a target pixel to search for information about each group and assign a label to the target pixel, and correcting the group information of the target pixel. This labeling scheme allows real-time image processing, facilitates hardware design, and can control a search range by controlling the range of the window since neighboring pixels are searched using the window. However, when a pixel, which is not connected to the target pixel, is within the search range, the pixel also belongs to the same group. As a result, it may be difficult to accurately differentiate between the regions of objects.